// 调试下各种类型判断方法
var str = 'djsahdfsd'
var array = [1,2,3,4,5,6,4]
var obj = {a: 232}
var voids1 = null
var voids2 = undefined
var num = 12343
var fn = function(val) {console.log('val', val)}

var promise = new Promise((resolve, reject) => {
  setTimeout(() => {
    resolve('测试')
  })
})

function Fs (name) {
  this.name = ''
}

Fs.prototype.get = function (val) {
  console.log('返回的数值为：' + val)
}

var fs = new Fs('name值')
var sex = Object.create(null)

console.log('str', typeof str)
console.log('array', typeof array)
console.log('obj', typeof obj)
console.log('voids1', typeof voids1)
console.log('voids2', typeof voids2)
console.log('num', typeof num)
console.log('fn', typeof fn)
console.log('fs', typeof fs)

console.log('通过 Object.prototype.toString判断原始数据')
console.log('str', Object.prototype.toString.call(str))
console.log('array', Object.prototype.toString.call(array))
console.log('voids1', Object.prototype.toString.call(voids1))
console.log('voids2', Object.prototype.toString.call(voids2))
console.log('obj', Object.prototype.toString.call(obj))
console.log('num', Object.prototype.toString.call(num))
console.log('通过 Object.prototype.toString判断原始数据')
console.log('fn', Object.prototype.toString.call(fn))
console.log('fs', Object.prototype.toString.call(fs))
console.log('sex', Object.prototype.toString.call(sex))

console.log('对象原型判断')
console.log('fs', fs)
console.log('fs', fs instanceof Fs)
console.log('sex', sex)
